<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 * tutor Hieu Ho
 */

class Display extends CI_Controller {

    public function __construct() {
        parent::__construct();
        $this->load->model('display_model');
    }

    function render($path, $data) {
        $this->load->view('user/common/header_view', $data);
        $this->load->view('user/common/left_sidebar_view', $data);
        $this->load->view('user/common/head_content_view', $data);
        $this->load->view($path, $data);
        $this->load->view('user/common/right_sidebar_view', $data);
        $this->load->view('user/common/footer_view', $data);
    }

    public function display_timgiasu() {
        $data['data'] = $this->display_model->load_timgiasu();
        $this->render('/giaodich/display_timgiasu_view.php', $data);
    }

    public function seach_timgiasu() {
        $data['data'] = $this->display_model->load_timgiasu();
        $this->render('/giaodich/display_timgiasu_view.php', $data);
    }

    public function display_lamgiasu() {
        $data['data'] = $this->display_model->load_lamgiasu();
        $this->render('/giaodich/display_lamgiasu_view.php', $data);
    }

    public function display_timgiasu_chitiet($id_giasu) {
        $data['data'] = $this->display_model->load_timgiasu_chitiet($id_giasu);
        $session_data = $this->session->userdata('logged_in');
        $data['id'] = $session_data['id'];
        $this->render('/giaodich/display_timgiasu_chitiet_view.php', $data);
    }

    public function display_lamgiasu_chitiet($id_giasu) {
        $data['data'] = $this->display_model->load_lamgiasu_chitiet($id_giasu);
        $session_data = $this->session->userdata('logged_in');
        $data['id'] = $session_data['id'];
        $this->render('/giaodich/display_lamgiasu_chitiet_view.php', $data);
    }

}

?>
